package io;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

public class FOSDemo {
    public static void main(String[]args) throws IOException {
        FileOutputStream fos=new FileOutputStream("fos.dat");
        File file=new File("fos.dat");
        /*

        FileOutputStream fos=new FileOutputStream(file,true);
         */
        fos.write(-1);
        fos.write(256);
        System.out.println("输出完毕");
        fos.close();
        /*
        //FileOutputStream fos=new FileOutputStream("fos.dat");
        File file=new File("fos.dat");
        FileOutputStream fos=new FileOutputStream(file,true);
        fos.write(-10);
        fos.write(256);
        fos.write(1);
        fos.write(2);
        System.out.println("输出完毕");
        fos.close();
        */
    }
}
